program sort;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  i,j,n: integer;
  fin, fout: textfile;
  mass: array of integer;
  flag: boolean;

 begin
  Assignfile (fin, 'input.txt');
  Assignfile (fout, 'output.txt');
  Reset (fin);
  Rewrite (fout);
  Readln (fin, n);
  setlength (mass, n);
  For i:= 0 to n-1 do
    Read (fin, mass[i]);
  for i:= 1 to n div 2 do
    begin
      flag:= true;
      for j:= i-1 to n-i-1 do
        if (mass[j] > mass[j+1]) then
        begin
          mass[j]:=mass[j]+mass[j+1];
          mass[j+1]:=mass[j]-mass[j+1];
          mass[j]:=mass[j]-mass[j+1];
          flag:=false;
        end;
      for j:= n-i-1 downto i-1 do
        if (mass[j] < mass[j-1]) then
        begin
          mass[j]:=mass[j]+mass[j-1];
          mass[j-1]:=mass[j]-mass[j-1];
          mass[j]:=mass[j]-mass[j-1];
          flag:=false;
        end;
      if (flag) then break;
    end;

  for i:= 0 to n-1 do
    Write (output, mass[i], ' ');
  Closefile (fin);
  Closefile (fout);
end.
